<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>hashchange history</title>
</head>
<body>
<button onclick="window.location.hash='#t'+(+new Date())">
    设置hash
</button>
<script src="../../base/javascript/kissy-min.js"></script>
<script>
    var S = KISSY,
            Node = S.Node,
            UA = S.UA;

    S.ready(function() {


        function notifyHashChange() {
            //debugger
            alert("hash change : " + window.location.hash);
        }


        S.Event.on(window, "hashchange", notifyHashChange);
        /*
         setTimeout(function() {
         KISSY.Event.remove(window, "hashchange", t);
         }, 5000);

         setTimeout(function() {
         KISSY.Event.on(window, "hashchange", t);
         }, 10000);
         */
    });
</script>
</body>
</html>